<template>
  <div class="app-container" >

    <el-row>
      <el-col :span="6"><i class="el-icon-s-order" style="color: #999999;margin-bottom: 20px;"></i><span style="margin-left: 5px;color: #999999;">联系人信息</span></el-col>
    </el-row>
    <div style="background-color:  #FAFAFA;padding: 20px;">
      <el-form ref="form" label-position="left" :model="form" :rules="rules" label-width="180px">
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="姓名:" prop="name">
               {{form.name}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="性别:" prop="sex">
              <dict-tag :options="dict.type.sys_user_sex" :value="form.sex"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="手机号码:" prop="phone">
               {{form.phone}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="职务:" prop="position">
               {{form.position}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="决策角色:" prop="decisionRole">
              <dict-tag :options="dict.type.zxcrm_decision_role" :value="form.decisionRole"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关系等级:" prop="relationshipLevel">
              <dict-tag :options="dict.type.zxcrm_relationship_level" :value="form.relationshipLevel"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="籍贯:" prop="nativePlace">
               {{form.nativePlace}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生日:" prop="birthday" >
               {{form.birthday}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="态度类别:" prop="attitudeCategory">
              <dict-tag :options="dict.type.zxcrm_attitude_category" :value="form.attitudeCategory"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="直属上司:" prop="immediateSupervisorId">
              {{contactMap[form.immediateSupervisorId]}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="沟通风格:" prop="communicationStyle">
              <dict-tag :options="dict.type.zxcrm_communication_style" :value="form.communicationStyle"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="对对接人的要求:" prop="contactPersonRequire">
               {{form.contactPersonRequire}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="对供应商的要求:" prop="supplierRequire">
               {{form.supplierRequire}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="兴趣爱好:" prop="hobby">
               {{form.hobby}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="往期履历:" prop="previousResume">
               {{form.previousResume}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="抽烟情况:" prop="smokingSituation">
               {{form.smokingSituation}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="喝酒情况:" prop="drinkingSituation">
               {{form.drinkingSituation}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="婚姻状况:" prop="maritalStatus">
              <dict-tag :options="dict.type.zxcrm_marital_status" :value="form.maritalStatus"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="家庭情况:" prop="familySituation">
               {{form.familySituation}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="社会关系说明:" prop="socialRelationshipsExplanation">
               {{form.socialRelationshipsExplanation}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="邮件地址:" prop="mailingAddress">
               {{form.mailingAddress}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="家庭住址:" prop="homeAddress">
               {{form.homeAddress}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="gutter">
          <el-col :span="12">
            <el-form-item label="其他备注:" prop="otherRemarks">
               {{form.otherRemarks}}
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>

  </div>
</template>

<script>

  export default{
    name:"customerOverview",
    dicts: ['zxcrm_relationship_level', 'zxcrm_communication_style', 'zxcrm_attitude_category', 'zxcrm_decision_role', 'sys_user_sex', 'zxcrm_marital_status'],
    props:{
      form:{
        default:{}
      },
      contactMap:{
        default:{}
      }
    },
    data() {
      return{
        gutter:20,
        // 表单校验
        rules: {
            companyName: [
              { required: true, message: '公司名称是必填项', trigger: 'blur' }
            ],
            customerLevel: [
              { required: true, message: '客户等级是必填项', trigger: 'blur' }
            ],
            customerType: [
              { required: true, message: '客户类型是必填项', trigger: 'blur' }
            ],
        }
      }
    },
    created(){
      this.reset()
    },
    methods:{

      reset() {
        this.mainSalesProduct = []
        this.basicInfoForm = {
          id: null,
          companyName: null,
          companyAbbreviation: null,
          customerClassify: null,
          customerLevel: null,
          operateAddress: null,
          actualControllerId: null,
          vaccineDepartmentHeadId: null,
          purchaseDockingId: null,
          warehouseOperatorId: null,
          userId: null,
          financeId: null,
          area: null,
          customerType: null,
          competitor: null,
          mainSalesProduct: null,
          customerReloationship: null,
          customerOrganizationalRelationship: null,
          other: null,
          inoculationAmount: null,
          purchaseHeadId: null,
          customerStatus: null,
          customerSource: null,
          customerTransationAnalysis: null,
          specialRequirement: null,
          paymentCycle: null,
          medicinePaymentMethod: null,
          warehouseDelivery: null,
          supplierAbbreviation: null,
          saleHeadId: null,
          saleContactId: null,
          supplierStatus: null,
          supplierSource: null,
          supplierType: null,
          supplierLevel: null,
          supplierOrganizationalRelationship: null,
          supplierPolicySupport: null,
          loanCycle: null,
          supplierPaymentMethod: null,
          dealStatus: null,
          dealTime: null,
          nextContactTime: null,
          inputMethod: null,
          informationCompleteness: null,
          status: null,
          delFlag: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null
        }
        this.resetForm("basicInfoForm")
      },
    }

  }
</script>

<style>
</style>
